import { RouteObject } from "react-router-dom";
import Layout from "../pages/layout";
import HomePage from "../pages/home";
import DocumentsPage from "../pages/documents";
import DocumentPage from "../pages/documents/document";
import ShowcasePage from "../pages/showcase";
import AboutMe from "../pages/about-me";
import DocumentAddPage from "../pages/documents/document-add";
import TodoListPage from "../pages/showcase/cases/todo-list";
import SimpleHook from "../pages/showcase/cases/simple-hook";
import AntvDemos from "../pages/showcase/cases/antv-demos";
import Portal from "../pages/showcase/cases/portal";
import LeetCode from "../pages/showcase/cases/leetcode";
import ReactSpringDemo from "../pages/showcase/cases/react-spring-demo";
import WebGLDemo from "../pages/showcase/cases/webgl";
import LeetCodeII from "../pages/showcase/cases/leetcode_II";

const routes: RouteObject[] = [
  {
    path: "/",
    element: <Layout />,
    children: [
      {
        // path: "/home-page",
        index: true,
        element: <HomePage />,
      },
      {
        path: "/documents",
        element: <DocumentsPage />,
      },
      {
        path: "/documents/document-add",
        element: <DocumentAddPage />,
      },
      {
        path: "/showcase",
        element: <ShowcasePage />,
      },
      {
        path: "/about-me",
        element: <AboutMe />,
      },
      {
        path: "/documents/document",
        element: <DocumentPage />,
      },
      // Showcases
      {
        path: "/todo-list",
        element: <TodoListPage />,
      },
      {
        path: "/simple-hook",
        element: <SimpleHook />,
      },
      {
        path: "/antv-demos",
        element: <AntvDemos />,
      },
      {
        path: "/portal-demos",
        element: <Portal />,
      },
      {
        path: "/leetcode",
        element: <LeetCode />,
      },
      {
        path: "/leetcode2",
        element: <LeetCodeII />,
      },
      {
        path: "/react-spring-demo",
        element: <ReactSpringDemo />,
      },
      {
        path: "/webgl-demo",
        element: <WebGLDemo />,
      },
    ],
  },
];

export default routes;
